<extend name="Public:common1"/>
<block name="css">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
    <style>
        .newMess th{text-align:center;}
        th,td{padding: 10px;}
        .row-div {
            height: auto;
            line-height: 30px;
            font-size: 14px;
            margin-bottom: 10px;
        }
        .base-info-box{
            margin: 20px 40px;
            height: 40px;
            line-height: 40px;
            background-color: #F6FBFD;
        }
        .header-bg-01{
            width: 2px;
            height: 40px;
            background-color: #5BC0DE;
            display: inline-block;
            float: left;
        }
        .header-title{
            float: left;
            display: inline-block;
            height: 40px;
            padding-left: 20px;
            line-height: 40px;
        }
        .col-xs-5 input{
            width: 400px!important;
        }

        .col-xs-5 select{
            width: 400px!important;
        }
        .explain{
            font-size: 12px;
            color: #ccc;
            height: 20px;
        }
        .margin-left-20{
            margin-left: 20px!important;
        }
        #wrapper{
            width: 900px!important;
        }
    </style>
</block>
<block name="content">
    <div class="page-header"><h1><i class="fa fa-home"></i> 首页>会员管理>添加会员</h1></div>
     <div class="container-fluid clearfix">
         <form action="" method="post" onsubmit="return check();">
<!--             <div class="base-info-box">
                    <span class="header-bg-01"></span>
                    <span class="header-title">基本信息</span>
            </div> -->
            <div class="row row-div">
                <div class="col-xs-2" ><p class="text-right"><font color='red'>*</font>姓名：</p></div>
                <div class="col-xs-5">
                    <input class="form-control" value="" required="required" type="text" name="visitor_name" id="visitor_name" placeholder="请输入会员的真实姓名">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-xs-2" ><p class="text-right"><font color='red'>*</font>会员卡号：</p></div>
                <div class="col-xs-5">
                    <input class="form-control" value="{$cardNum}" readonly type="text" name="card_num" id="card_num">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-xs-2" ><p class="text-right">性别：</p></div>
                <div class="col-xs-6">
                    <input type='radio' width="30" id='visitor_sex1' name='visitor_sex' value="1" checked /><span>男</span>
                    <input  style="margin-left: 10px;" type='radio' width="30" id='visitor_sex2' name='visitor_sex' value='2'/><span>女</span>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-xs-2" ><p class="text-right"><font color='red'>*</font>证件号：</p></div>
                <div class="col-xs-5">
                    <input class="form-control" value="" required="required" type="text" name="documents_num" id="documents_num" placeholder="请输入会员的证件号">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-xs-2" ><p class="text-right"><font color='red'>*</font>联系电话：</p></div>
                <div class="col-xs-5">
                    <input class="form-control" value="" required="required" type="number" name="visitor_phone" id="visitor_phone" maxlength="50">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-xs-2" ><p class="text-right">工作单位：</p></div>
                <div class="col-xs-5">
                    <input class="form-control" value="" type="text" name="work_units" id="work_units">
                </div>
            </div>
            <div style="height: 10px" ></div>
            <div class="col-xs-8" style="margin-left: 0px;text-align: center;">
                <button class="btn btn-info" type="submit">
                    <i class="icon-ok bigger-110"></i>提交
                </button>&nbsp; &nbsp; &nbsp;
            </div>
         </form>
     </div>
</block>
<block name="js">
<script>
var $visitor_phone = $('#visitor_phone')
var $documents_num = $('#documents_num')
// var $card_num      = $('#card_num')
// var $visitor_name  = $('#visitor_name')

var phoneTest = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
// var documentsTest = /\d-/;
function check () {
    if(!phoneTest.test($visitor_phone.val())){
        layer.alert('请填写正确的手机号码',{icon: 5});
        $visitor_phone.focus();
        return false;
    }

    // if(!documentsTest.test($documents_num.val())){
    //     layer.msg('请填写正确的证件号码');
    //     $documents_num.focus();
    //     return false;
    // }

    return true;
}
</script>
</block>